<?
include "channels.php";
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon" />
    <title>TV Remote Control</title>    
    <script type="text/javascript" src="/js/prototype.js"></script>
    <script type="text/javascript" src="/js/scriptaculous/slider.js"></script>  
    <link rel="stylesheet" type="text/css" href="/css/reset.css" media="screen"></link>
    <link rel="stylesheet" type="text/css" href="/css/text.css" media="screen"></link>
    <link rel="stylesheet" type="text/css" href="/css/960.css" media="screen"></link>
    <link rel="stylesheet" type="text/css" href="/css/style.css" media="screen"></link>
    <style type="text/css">
       body {
         background-color:#FFFFFF;
       }
       .logo {
         padding:18px;
         cursor:pointer;
       }
    </style>


    <script type="text/javascript">
        function channel(n) {
            command("channel",  "channel%3D" + n);
        }

        function command(cmd, params) {
            new Ajax.Request("/proxy.php?path=%3Faction%3D" + cmd + "%26" + params, {
                method: "GET",
                onSuccess: function(t) {

                },
                onFailure: function(t) {alert("OOPS");}
            });
        }
    </script>
  </head>
  <body>
<?
    foreach ($channels as $c) {
        if ($c["display"]) {
            print "<img onclick=\"channel($c[number])\" class=\"logo\" width=\"75\" height=\"75\" src=\"/tv/logo/75/$c[logo]\" alt=\"$c[callsign]\">";
	}
    }
?> 
  </body>
</html>
